<template>
  <a-card :bordered="false" style="background: #fff; position: absolute; inset: 18px" :body-style="{ background: '#fff' }">
    <a-row :gutter="24" style="height: 100%">
      <a-col :span="5" :style="{ height: treeHeight }">
        <div style="width: 100%; padding: 0 10px; height: 100%">
          <span class="list_title"> 摄像头列表 </span>
          <div class="nvrip" id="nvrip">
            <Select
              @change="nvripChange"
              :getPopupContainer="(triggerNode) => triggerNode.parentElement"
              dropdownClassName="drop"
              :options="options"
              v-model:value="nvripActive"
              placeholder=""
              :style="{ width: '100%' }"
            />
          </div>
          <div style="height: calc(100% - 30px - 75px)">
            <div :style="{ overflow: 'auto', height: '100%' }">
              <!-- @check="onCheck" -->
              <Tree
                v-if="treeData.length"
                class="treeStyle"
                :selectedKeys="selectedKeys"
                :checkedKeys="checkedKeysReally"
                :expandedKeys="expandedKeys"
                checkable
                :treeData="treeData"
                :fieldNames="{ title: 'name' }"
                @select="onSelect"
                @check="onSelect"
                @expand="onExpand"
              >
                <!-- <template #switcherIcon="{ dataRef }">
                  <template v-if="dataRef.deviceType === '2'">
                    <img src="~@/assets/images/gun_checked.png" v-if="checkedKeysReally.includes(dataRef.key)" />
                    <img src="~@/assets/images/gun_uncheck.png" v-else />
                  </template>
                  <template v-if="dataRef.deviceType === '2'">
                    <img src="~@/assets/images/ball_checked.png" v-if="checkedKeysReally.includes(dataRef.key)" />
                    <img src="~@/assets/images/ball_uncheck.png" v-else />
                  </template>
                  <component :is="none" v-else />
                </template> -->
              </Tree>
            </div>
          </div>
        </div>
      </a-col>
      <a-col :span="14" style="height: 100%">
        <div style="text-align: center; height: 100%">
          <video-view2
            style="height: 100%"
            ref="videoView"
            :iChannelID="iChannelID"
            :popupFlag="true"
            :showScreen="showScreen"
            @checkedKeysChange="checkedKeysChange"
            @checkedKeysChangeTwo="checkedKeysChangeTwo"
            :screenFlag="true"
            @changeScreen="changeScreen"
          >
          </video-view2>
        </div>
      </a-col>
      <a-col :span="5" style="height: 100%">
        <div style="width: 100%; padding: 0 10px; height: 45%">
          <span class="list_title"> 云台控制 </span>
          <div style="padding: 20px; position: relative">
            <div style="position: relative; width: auto">
              <img src="~@/assets/video/button_direction1.png" style="width: 76%; display: block; margin: 0 auto" />
              <div class="direction_button_list">
                <span class="slice slice_one" @mousedown="mouseDownPTZControl(3)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_two" @mousedown="mouseDownPTZControl(5)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_three" @mousedown="mouseDownPTZControl(1)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_four" @mousedown="mouseDownPTZControl(7)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="auto_btn"></span>
                <span class="slice slice_five" @mousedown="mouseDownPTZControl(4)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_six" @mousedown="mouseDownPTZControl(8)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_seven" @mousedown="mouseDownPTZControl(2)" @mouseup="mouseUpPTZControl()"> </span>
                <span class="slice slice_eight" @mousedown="mouseDownPTZControl(6)" @mouseup="mouseUpPTZControl()"> </span>
              </div>
            </div>
            <div style="overflow: hidden; display: flex; align-items: center; justify-content: space-between">
              <div class="btn_three one">
                <span @mousedown="PTZZoomIn()" @mouseup="PTZZoomStop()" title="调焦+"></span>
                <span @mousedown="PTZZoomout()" @mouseup="PTZZoomStop()" title="调焦-"></span>
              </div>
              <div class="btn_three two">
                <span @mousedown="PTZIrisIn()" @mouseup="PTZIrisStop()" title="聚焦+"></span>
                <span @mousedown="PTZIrisOut()" @mouseup="PTZIrisStop()" title="聚焦-"></span>
              </div>
              <div class="btn_three three">
                <span @mousedown="PTZFocusIn()" @mouseup="PTZFoucusStop()" title="光圈+"></span>
                <span @mousedown="PTZFoucusOut()" @mouseup="PTZFoucusStop()" title="光圈-"></span>
              </div>
            </div>
          </div>
        </div>
        <div style="width: 100%; padding: 0 10px; height: 55%">
          <span class="list_title">设备统计</span>
          <div class="list_card" style="height: calc(100% - 30px); color: #4e5969">
            <!-- <div class="tips">
                            <span>摄像头总数 <span>{{monitorData.allNum}}</span></span>
                            <div class="left lit_box1">球机摄像头 <span>{{monitorData.ballNum}}</span></div>
                            <div class="left lit_box2">枪机摄像头 <span>{{monitorData.gunNUm}}</span></div>
                            <div class="left lit_box3">防熏蒸摄像头 <span>{{monitorData.fumigation}}</span></div>
                            <div class="left lit_box4">防爆摄像头 <span>{{monitorData.flameproof}}</span></div>
                            <div class="right lit_box5">在线摄像头 <span>{{monitorData.onLineNum}}</span></div>
                            <div class="right lit_box6">在线率 <span>{{monitorData.onLineRatio}}%</span></div>
                            <div class="right lit_box7">离线摄像头 <span>{{monitorData.offLineNum}}</span></div>
                            <div class="right lit_box8">离线率 <span>{{monitorData.offLineRatio}}%</span></div>
                        </div> -->
            <div class="tit">
              <div>{{ monitorData.allNum }}</div>
              <div>摄像头总数</div>
            </div>
            <div class="card">
              <div>
                <div>{{ monitorData.ballNum }}<span>个</span></div>
                球机摄像头
              </div>
              <div>
                <div>{{ monitorData.gunNUm }}<span>个</span></div>
                枪机摄像头
              </div>
              <div>
                <div>{{ monitorData.fumigation }}<span>个</span></div>
                防熏蒸摄像头
              </div>
              <div>
                <div>{{ monitorData.flameproof }}<span>个</span></div>
                防爆摄像头
              </div>
              <div>
                <div>{{ monitorData.onLineNum }}<span>个</span></div>
                在线摄像头
              </div>
              <div>
                <div>{{ monitorData.offLineNum }}<span>个</span></div>
                离线摄像头
              </div>
            </div>

            <div class="ratio on">
              在线率
              <span>
                {{ monitorData.onLineRatio }}
                <span>%</span>
              </span>
            </div>
            <div class="ratio off">
              离线率
              <span>
                {{ monitorData.offLineRatio }}
                <span>%</span>
              </span>
            </div>
          </div>
        </div>
      </a-col>
    </a-row>
  </a-card>
</template>

<script>
import { Select, Tree } from 'ant-design-vue';
import videoView2 from '@/views/mintor/videoView2.vue';
import { getNvrList, getLocation } from '@/api/video.js';
import { useMessage } from '/@/hooks/web/useMessage';
// import { initDictOptions } from '@/components/dict/JDictSelectUtil'

export default {
  name: 'mintor',
  components: {
    videoView2,
    Select,
    Tree,
  },
  data() {
    return {
      options: [],
      treeData: [],
      // url: window._CONFIG['domianURL'] + '/big/screen/templat/index6?token=' + Vue.ls.get(ACCESS_TOKEN),
      treeHeight: '100%',
      iChannelID: [],
      screenNnum: 1,
      speed: 4,
      selectedKeys: [],
      checkedKeys: [],
      checkedKeysReally: [],
      showScreen: 3,
      expandedKeys: [],
      monitorData: {
        allNum: 0,
        ballNum: 0,
        gunNUm: 0,
        flameproof: 0,
        fumigation: 0,
        onLineNum: 0,
        offLineNum: 0,
        onLineRatio: 0,
        offLineRatio: 0,
      },
      nvripList: [],
      nvripActive: '',
      checkedKeysNow: [],
    };
  },
  async mounted() {
    document.getElementsByTagName('body')[0].style.background = '#f9f9f9';
    /**
     * 摄像头数据接口
     */
    // getAction('/hiksdk/devinfoStatic').then((res) => {
    //     // console.log(res)
    //     this.monitorData = {
    //         allNum: res.result['摄像头总数'],
    //         ballNum: res.result['球机摄像头'],
    //         gunNUm: res.result['枪机摄像头'],
    //         flameproof: res.result['防爆摄像头'],
    //         fumigation: res.result['防熏蒸摄像头'],
    //         onLineNum: res.result['在线摄像头'],
    //         offLineNum: res.result['离线摄像头'],
    //         onLineRatio: res.result['在线率'],
    //         offLineRatio: res.result['离线率'],
    //     }
    // })

    /**
     * 录像机列表
     */
    await getNvrList({}).then((res) => {
      this.nvripList = res;
      res.map((item) => {
        this.options.push({
          label: item.name,
          value: item.ip,
          key: item.ip,
        });
      });

      //录像机选中第一个
      this.nvripActive = this.nvripList[0].ip;
      this.getLocationData(this.nvripList[0].id);
    });
  },
  beforeDestroy() {
    document.getElementsByTagName('body')[0].style.background = '';
  },
  methods: {
    /**
     * 方位接口 传录像机id 默认第一个录像机
     */
    async getLocationData(id) {
      // 设备位置
      var data = [];
      //录像机下所有设备
      var data2 = [];
      await getLocation(id, {}).then((res) => {
        data = res.deviceGroup; // 方位数据列表
        data2 = [...res.deviceList]; //所有设备列表
      });

      //treeData的children
      var childrenData = [];
      var childrenData2 = data2;
      var expandedKeys = [];

      //通道号排序
      //   childrenData2 = childrenData2.sort(function (a, b) {
      //     return a.channelAnalog * 1 - b.channelAnalog * 1;
      //   });

      //方位循环
      for (var i = 0; i < data.length; i++) {
        //筛选同一方位的放进children
        var children = childrenData2.filter((item, index) => {
          item.disabled = false;
          item.key = '0-' + i + '-' + index;
          item.name = item.deviceName;
          // this.iChannelID.push(item.channelNumber);
          if (item.deviceGroup) {
            return item.deviceGroup == data[i].value;
          } else {
            if (i == data.length - 1) {
              return true;
            } else {
              return false;
            }
          }
        });
        //设置树状图二级数据
        if (children.length > 0) {
          childrenData.push({
            name: data[i].text,
            key: '0-' + i,
            disabled: true,
            deviceGroup: data[i].value,
            children: JSON.parse(JSON.stringify(children)),
          });
          //展开二级
          expandedKeys.push('0-' + i);
        }
      }

      //树形数据
      this.treeData = childrenData;
      this.expandedKeys = expandedKeys;
      this.checkedKeys = this.treeData[0].children;
      console.log(666, this.treeData);

      //默认展示所有格数监控
      for (let k = 0; k < this.checkedKeys.length; k++) {
        if (k < this.showScreen * this.showScreen) {
          this.checkedKeysReally.push(this.checkedKeys[k].key);
          this.checkedKeysNow.push(this.checkedKeys[k].key);
          this.iChannelID.push(this.checkedKeys[k].channelNumber);
        }
      }

      //登录 默认第一个
      this.$refs.videoView.clickLogoin(this.nvripList[0]);
      this.$nextTick(() => {
        this.treeHeight = 'calc(' + this.$refs.videoView.pluginStyle.height + ' + 35px)';
      });
    },
    /**
     * 录像机切换
     */
    nvripChange(e) {
      var screenNum = this.$refs.videoView.screenNum;
      this.nvripActive = e;
      this.checkedKeysReally = [];
      this.showScreen = screenNum;
      for (let i = 0; i < screenNum * screenNum; i++) {
        this.checkedKeysReally.push(this.checkedKeys[this.nvripActive][i]);
      }
      this.$nextTick(() => {
        this.$refs.videoView.nvripChange(this.nvripActive);
      });
    },
    /**
     * 分屏
     */
    changeScreen(num) {
      this.showScreen = num;
    },
    /**
     * 勾选事件
     */
    onSelect(selectedKeys, info) {
      console.log(selectedKeys);

      if (info.checked) {
        //选中
        //设备较多 勾选状态变更
        /***
         * 情况1 有空余格位 直接播放
         */
        if (this.checkedKeysReally.length < this.showScreen * this.showScreen) {
          //更新树状选中状态
          console.log(999, this.$refs.videoView.iChannelIDWindow);
          console.log(777, this.$refs.videoView.iChannelIDWindow[this.$refs.videoView.g_iWndIndex]);
          if (this.$refs.videoView.iChannelIDWindow[this.$refs.videoView.g_iWndIndex]!=undefined) {
            //选中视频格有视频播放
            useMessage().createMessage.warning('当前选中格正在播放');
          } else {
            this.checkedKeysReally = selectedKeys;
            this.checkedKeysNow = selectedKeys;
            //更新通道数组
            this.iChannelID[this.$refs.videoView.g_iWndIndex] = info.node.channelNumber;
          }
        } else {
          /***
           * 情况2 无空余格位 更换当前选中格的视频源
           */
          /**
           * 暂时播放提示 当前播放视频数已满
           */
          useMessage().createMessage.warning('当前播放视频数已满');

          /***
           * 数据多了再修改
           */
          //   //获取当前选中窗口
          //   var g_iWndIndex = this.$refs.videoView.g_iWndIndex;
          //   //更新树状选中状态
          //   this.checkedKeysReally = selectedKeys;
          //   //更新通道数组
          //   this.iChannelID.push(info.node.channelNumber);
        }
      } else {
        //取消选中
        //更新通道数组 (为undefined停止播放)
        console.log(888, this.checkedKeysReally, info.node.key);
        this.iChannelID[this.checkedKeysNow.indexOf(info.node.key)] = undefined;
        this.checkedKeysNow[this.checkedKeysNow.indexOf(info.node.key)] = '';
        //更新树状选中状态
        this.checkedKeysReally = selectedKeys;
      }

      //更新video
      this.$nextTick(() => {
        this.$refs.videoView.iChannelIDChange();
      });
    },
    /**
     * 展开收起树节点
     */
    onExpand(expandedKeys) {
      setTimeout(() => {
        this.expandedKeys = expandedKeys;
        // this.autoExpandParent = false
      }, 100);
    },
    //分屏修改树状图选中
    checkedKeysChange(iType) {
      this.checkedKeysReally = this.checkedKeysNow.slice(0, iType * iType);
    },
    checkedKeysChangeTwo(index_db) {
      this.checkedKeysReally = [];
      // let value1 = this.checkedKeys[this.nvripActive][0]
      // let channel1 = this.iChannelID[this.nvripActive][0]
      let value2 = this.checkedKeys[this.nvripActive][index_db];
      let channel2 = this.iChannelID[this.nvripActive][index_db];
      this.$set(this.checkedKeys[this.nvripActive], 0, value2);
      this.$set(this.iChannelID[this.nvripActive], 0, channel2);
      // this.$set(this.checkedKeys[this.nvripActive], index_db, value1)
      // this.$set(this.iChannelID[this.nvripActive], index_db, channel1)
      this.checkedKeysReally = [value2];
      this.$nextTick(() => {
        this.$refs.videoView.iChannelIDChange();
      });
    },
    mouseDownPTZControl(iPTZIndex) {
      // console.log(iPTZIndex)
      this.$refs.videoView.mouseDownPTZControl(iPTZIndex);
    },
    mouseUpPTZControl() {
      // console.log("end")
      this.$refs.videoView.mouseUpPTZControl();
    },
    addSpeed() {
      if (this.speed < 7) {
        this.speed++;
      }
    },
    reduceSpeed() {
      if (this.speed > 0) {
        this.speed++;
      }
    },
    // 放大
    PTZZoomIn() {
      this.$refs.videoView.PTZZoomIn();
    },
    PTZZoomout() {
      this.$refs.videoView.PTZZoomout();
    },
    PTZZoomStop() {
      this.$refs.videoView.PTZZoomStop();
    },
    // 光圈
    PTZIrisIn() {
      this.$refs.videoView.PTZIrisIn();
    },
    PTZIrisOut() {
      this.$refs.videoView.PTZIrisOut();
    },
    PTZIrisStop() {
      this.$refs.videoView.PTZIrisStop();
    },
    // 聚焦
    PTZFocusIn() {
      this.$refs.videoView.PTZFocusIn();
    },
    PTZFoucusStop() {
      this.$refs.videoView.PTZFoucusStop();
    },
    PTZFoucusOut() {
      this.$refs.videoView.PTZFoucusOut();
    },
  },
};
</script>

<style lang="less" scoped>
.drop {
  width: 100%;
  left: 0 !important;
}
:deep(.ant-select-dropdown) {
  left: 0 !important;
}
:deep(.ant-card-body) {
  height: 100%;
}
:deep(.ant-tree.treeStyle) {
  height: calc(100% - 50px);
  .ant-tree-switcher_open {
    background: url('@/assets/images/close.png') no-repeat;
    background-size: 100% 100%;
    background-size: 15px;
    background-position: center;
    .ant-tree-switcher-icon {
      display: none;
    }
  }
  .ant-tree-switcher_close {
    background: url('@/assets/images/open.png') no-repeat;
    background-size: 100% 100%;
    background-size: 15px;
    background-position: center;
    .ant-tree-switcher-icon {
      display: none;
    }
  }
  .ant-tree-checkbox-disabled {
    display: none;
  }
  .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
    color: #000;
  }
  .ant-tree-checkbox-checked {
    margin: 0;
    .ant-tree-checkbox-inner {
      background: url('@/assets/images/gun_checked.png') no-repeat !important;
      background-size: 100% 100% !important;
      border: none;
      width: 20px;
      height: 20px;
    }
  }
  .ant-tree-checkbox {
    margin: 0;
    .ant-tree-checkbox-inner {
      background: url('@/assets/images/gun_uncheck.png') no-repeat;
      background-size: 100% 100%;
      border: none;
      width: 20px;
      height: 20px;
      &::after {
        display: none;
      }
    }
  }
  .ant-tree-node-content-wrapper-open {
    cursor: auto;
  }
}

.list_title {
  font-size: 16px;
  display: inline-block;
  font-weight: bold;
  // margin-bottom: 5px;
  height: 30px;
}

.list_card {
  // background: #ffffff;
  // box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
  // border-radius: 6px 6px 6px 6px;
  // opacity: 1;
  background-color: #f2f3f5;
  border-radius: 2px;

  .tips {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    > span {
      display: inline-block;
      text-align: center;
      width: 100%;

      span {
        // color: #1fffd7;
        font-weight: bold;
      }
    }

    div.left,
    div.right {
      display: inline-block;
      text-align: center;
      width: 50%;

      > span {
        // color: #1fffd7;
        font-weight: bold;
      }
    }
  }

  .tit {
    color: #fff;
    text-align: center;
    background: url(@/assets/video/tit.png) no-repeat;
    background-size: auto 100%;
    background-position: center;

    > div:nth-child(1) {
      font-size: 16px;
    }

    > div:nth-child(2) {
      font-size: 12px;
    }
  }

  .card {
    overflow: hidden;

    > div {
      width: calc(100% / 3);
      float: left;
      text-align: center;
      margin-top: 20px;
      font-weight: 400;
      font-size: 12px;
      color: #999999;

      > div {
        font-weight: 600;
        font-size: 18px;
        color: #333333;
        line-height: normal;

        > span {
          font-weight: 600;
          font-size: 10px;
          color: #999999;
        }
      }
    }
  }

  .ratio {
    width: calc(100% - 40px);
    height: 30px;
    margin: 0 auto;
    line-height: 30px;
    padding-left: 8%;
    padding-right: 8%;
    font-weight: 500;
    font-size: 16px;

    > span {
      font-weight: bold;
      font-size: 20px;
      float: right;

      > span {
        font-weight: 400;
        font-size: 12px;
      }
    }

    &.on {
      color: #2c71d9;
      background: url(@/assets/video/ratio_on.png) no-repeat;
      background-size: 100% 100%;
      margin-top: 30px;
      margin-bottom: 20px;
    }

    &.off {
      color: #999999;
      background: url(@/assets/video/ratio_off.png) no-repeat;
      background-size: 100% 100%;
    }
  }
}

.direction_button_list {
  position: absolute;
  width: 76%;
  left: 12%;
  top: 0;
  bottom: 0;
  right: 12%;

  .slice {
    display: block;
    width: 20%;
    height: 20%;
    position: absolute;
    cursor: pointer;

    &::after {
      content: '';
      display: block;
      width: 0;
      height: 0;
      border: 7px solid #d6ddeb;
      border-right: 7px solid transparent;
      border-top: 7px solid transparent;
      position: absolute;
      left: calc(50% - 7px);
      top: calc(50% - 7px);
      border-radius: 4px;
    }

    &:hover {
      &::after {
        border: 7px solid #165dff;
        border-right: 7px solid transparent;
        border-top: 7px solid transparent;
      }
    }

    &:nth-child(1) {
      transform: rotateZ(45deg);
      top: 40%;
      left: 5%;
    }

    &:nth-child(2) {
      transform: rotate(90deg);
      top: 15%;
      left: 15%;
    }

    &:nth-child(3) {
      transform: rotate(135deg);
      top: 5%;
      left: 40%;
    }

    &:nth-child(4) {
      transform: rotate(180deg);
      top: 15%;
      right: 15%;
    }

    &:nth-child(6) {
      transform: rotate(225deg);
      top: 40%;
      right: 5%;
    }

    &:nth-child(7) {
      transform: rotate(270deg);
      bottom: 15%;
      right: 15%;
    }

    &:nth-child(8) {
      transform: rotate(315deg);
      bottom: 5%;
      left: 40%;
    }

    &:nth-child(9) {
      bottom: 15%;
      left: 15%;
    }
  }
}

.btn_three {
  display: flex;
  // width: 50%;
  // width: calc(100% / 3);
  justify-content: center;
  margin-top: 15px;
  float: left;
  background: #f2f3f5;
  border-radius: 15px;
  width: 65px;
  padding: 0 5px;

  span {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 28px;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    // border: 1px solid #ccc;

    &:nth-child(1) {
      border-right: 0;
      border-radius: 15px 0 0 15px;
    }

    &:nth-child(2) {
      border-left: 0;
      border-radius: 0 15px 15px 0px;
    }
  }

  &.one {
    span:nth-child(1) {
      background: url(@/assets/video/big_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/big_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }

    span:nth-child(2) {
      background: url(@/assets/video/small_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/small_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }
  }

  &.two {
    span:nth-child(1) {
      background: url(@/assets/video/gaungquanbig_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/gaungquanbig_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }

    span:nth-child(2) {
      background: url(@/assets/video/gaungquansmall_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/gaungquansmall_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }
  }

  &.three {
    span:nth-child(1) {
      background: url(@/assets/video/jujiaobig_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/jujiaobig_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }

    span:nth-child(2) {
      background: url(@/assets/video/jujiaosmall_1.png);
      background-size: 70%;
      background-repeat: no-repeat;
      background-position: center center;

      &:hover {
        background: url(@/assets/video/jujiaosmall_2.png);
        background-size: 70%;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }
  }
}

.preset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 23px;
  .each {
    display: flex;
    align-items: center;
    .index {
      width: 30px;
      text-align: right;
    }
  }
  .presetOption {
    display: flex;
    align-items: center;
    img {
      margin-right: 10px;
      cursor: pointer;
    }
  }
}

.blue {
  background: rgba(44, 134, 217, 0.1);
  color: #2c86d9;
}

/deep/.ant-btn-group {
  .ant-btn {
    border: 1px solid #165dff;
    background: #f9f9f9;

    &.active {
      color: #165dff;
      background: rgba(22, 93, 255, 0.12);
    }
  }
}

.nvrip {
  width: 100%;
  margin: 0 auto;
  background: #f2f3f5;
  //   padding: 5px;
  border-radius: 2px;
  margin-top: 5px;
  margin-bottom: 10px;
  :deep(.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector) {
    border-color: transparent;
    box-shadow: none;
  }
  .ant-select-selection__rendered {
    height: 100%;
  }

  .ant-select-selector {
    border: none !important;
  }

  .ant-select-selection {
    border: none !important;
    box-shadow: none;
  }
  :deep(.ant-select-selector) {
    background-color: transparent;
    border: none;
  }
  div {
    display: inline-block;
    width: 80px;
    text-align: center;
    padding: 2px 12px;
    white-space: nowrap;
    width: calc(100% / 3);

    &.active {
      background: #fff;
      font-weight: 500;
      color: #2c86d9;
      border-radius: 2px;
    }

    span {
      cursor: pointer;
    }
  }
}
</style>